@extends('client/layoutIndex')

@section('link')
    <link rel="stylesheet" href="{{ asset('client/css/more.css') }}">
@stop

@section('content')

        <div class="more">
            <div style="width:100%;max-width:1200px;margin:auto;">
                    <div class="more-ggw">
                        <div class="more-ggw1"><img src="{{ asset('productImg/'.$ad4->picture) }}" width="180px" height="200px"></div>
                        <div class="more-ggw2"><img src="{{ asset('productImg/'.$ad5->picture) }}" width="180px" height="200px"></div>
                    </div>
                    <center>
                    <div class="more-center">
                        <div class="more-tit">
                            
                            <span id="msg" style="display: none">
                                @if (count($errors) > 0)
                                    @foreach ($errors->all() as $error)
                                        <div style="width: 100%;">
                                             <span style="color: red;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ $error }}</span>
                                        </div>
                                    @endforeach
                                @endif
                                    </span>
                            <script type="text/javascript">
                                var _msg = $('#msg div span').text();
                                console.log(_msg);
                                if(_msg != ''){
                                    layer.msg(_msg);
                                }
                            </script>
                        </div>
                        @foreach($list as $l)
                        <div class="ts-sp-1">
                            <div style="width:100%;max-width:236px;height:20px;"></div>
                            <div class="ts-sp-img">
                                <img src="{{ asset('productImg/'.$l['goods_picture']) }}" class="img-responsive">
                            </div>
                            <div class="ts-sp-tit">
                                &nbsp;{{ $l['goods_name'] }}
                            </div>
                            <div class="ts-sp-jia">
                                <div class="jia">
                                    <div class="jia-left">
                                        <span class="afterD">&nbsp;折后</span>
                                        <span class="afterD1"> {{ $l['goods_price'] }}</span>
                                        <span style="font-size:40px;">/</span>
                                    </div>
                                    <div class="jia-right">
                                        <div style="width:100%;max-width:98px;height:40px;line-height:40px;">
                                            <s style="margin-top:-10px;">原价{{ round($l['goods_price']/0.85) }}</s>
                                        </div>
                                        <div style="width:100%;max-width:98px;height:40px;line-height:20px;">
                                             <b>库存{{ $l['goods_inventory'] }}</b>
                                        </div>
                                       
                                    </div>
                                </div>
                                <div class="look">
                                    <div class="xiangqing">
                                        <a href="{{ url('client/goodsShow/'.$l['id']) }}">查看详情>></a>
                                    </div>

                                    @if($l['goods_inventory'] > 0)
                                        <div class="liji">
                                            <a href="{{ url('client/toOrder/'.$l['id'].'/1') }}">立即兑换</a>
                                        </div>
                                    @else
                                        <div class="duihuan">已经兑完</div>
                                    @endif

                                </div>
                            </div>
                        </div>
                            <div class="clear"></div>
                        @endforeach

                    </div>

                    </center>
                    <div class="more-ggw-1">
                        <div class="more-ggw3"><img src="{{ asset('productImg/'.$ad6->picture) }}" width="239px" height="310px"></div>
                    </div>

            </div>

            <div style="clear:both;"></div>

            <div calss="pages" style="text-align: center;">
                {{ $list->links() }}
            </div>
        </div>
    <!-- --更多 end-- -->

@stop